package com.brs.model;

import java.util.ArrayList;

public class Borrower extends Person {
	private Card card;
	private int maxIssuedBooks;
	private ArrayList<BookItem> issuedBooks = new ArrayList<>();
	private float dailyFee;

	public Card getCard() {
		return card;
	}

	public void setCard(Card card) {
		this.card = card;
	}

	public int getMaxIssuedBooks() {
		return maxIssuedBooks;
	}

	public void setMaxIssuedBooks(int maxIssuedBooks) {
		this.maxIssuedBooks = maxIssuedBooks;
	}

	public ArrayList<BookItem> getIssuedBooks() {
		return issuedBooks;
	}

	public void setIssuedBooks(ArrayList<BookItem> issuedBooks) {
		this.issuedBooks = issuedBooks;
	}

	public float getDailyFee() {
		return dailyFee;
	}

	public void setDailyFee(float dailyFee) {
		this.dailyFee = dailyFee;
	}

	public float payBill(float bill) {
		return card.deduct(bill);
	}

	@Override
	public String toString() {
		return "Borrower [card=" + card + ", maxIssuedBooks=" + maxIssuedBooks + ", issuedBooks=" + issuedBooks
				+ ", dailyFee=" + dailyFee + "]";
	}

}
